home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / ToolUtils.h < prev    next >
Text File  |  1991-04-17  |  3KB  |  115 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 10:13 PM
  4.     ToolUtils.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __TOOLUTILS__
  15. #define __TOOLUTILS__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.     sysPatListID = 0,
  25.     iBeamCursor = 1,
  26.     crossCursor = 2,
  27.     plusCursor = 3,
  28.     watchCursor = 4
  29. };
  30.  
  31. struct Int64Bit {
  32.     long hiLong;
  33.     long loLong;
  34. };
  35.  
  36. typedef struct Int64Bit Int64Bit;
  37.  
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. pascal Fixed FixRatio(short numer,short denom)
  43.     = 0xA869; 
  44. pascal Fixed FixMul(Fixed a,Fixed b)
  45.     = 0xA868; 
  46. pascal short FixRound(Fixed x)
  47.     = 0xA86C; 
  48. pascal StringHandle GetString(short stringID)
  49.     = 0xA9BA; 
  50. pascal long Munger(Handle h,long offset,const void *ptr1,long len1,const void *ptr2,
  51.     long len2)
  52.     = 0xA9E0; 
  53. pascal void PackBits(Ptr *srcPtr,Ptr *dstPtr,short srcBytes)
  54.     = 0xA8CF; 
  55. pascal void UnpackBits(Ptr *srcPtr,Ptr *dstPtr,short dstBytes)
  56.     = 0xA8D0; 
  57. pascal Boolean BitTst(const void *bytePtr,long bitNum)
  58.     = 0xA85D; 
  59. pascal void BitSet(void *bytePtr,long bitNum)
  60.     = 0xA85E; 
  61. pascal void BitClr(void *bytePtr,long bitNum)
  62.     = 0xA85F; 
  63. pascal long BitAnd(long value1,long value2)
  64.     = 0xA858; 
  65. pascal long BitOr(long value1,long value2)
  66.     = 0xA85B; 
  67. pascal long BitXor(long value1,long value2)
  68.     = 0xA859; 
  69. pascal long BitNot(long value)
  70.     = 0xA85A; 
  71. pascal long BitShift(long value,short count)
  72.     = 0xA85C; 
  73. pascal short HiWord(long x)
  74.     = 0xA86A; 
  75. pascal short LoWord(long x)
  76.     = 0xA86B; 
  77. pascal void LongMul(long a,long b,Int64Bit *result)
  78.     = 0xA867; 
  79. pascal Handle GetIcon(short iconID)
  80.     = 0xA9BB; 
  81. pascal void PlotIcon(const Rect *theRect,Handle theIcon)
  82.     = 0xA94B; 
  83. pascal PatHandle GetPattern(short patternID)
  84.     = 0xA9B8; 
  85. pascal CursHandle GetCursor(short cursorID)
  86.     = 0xA9B9; 
  87. pascal PicHandle GetPicture(short pictureID)
  88.     = 0xA9BC; 
  89. pascal Fixed SlopeFromAngle(short angle)
  90.     = 0xA8BC; 
  91. pascal short AngleFromSlope(Fixed slope)
  92.     = 0xA8C4; 
  93. StringHandle newstring(char *theString); 
  94. pascal void SetString(StringHandle theString,ConstStr255Param strNew)
  95.     = 0xA907; 
  96. pascal long DeltaPoint(Point ptA,Point ptB)
  97.     = 0xA94F; 
  98. pascal StringHandle NewString(ConstStr255Param theString)
  99.     = 0xA906; 
  100. pascal void ShieldCursor(const Rect *shieldRect,Point offsetPt)
  101.     = 0xA855; 
  102. pascal void GetIndString(Str255 theString,short strListID,short index); 
  103. void getindstring(char *theString,short strListID,short index); 
  104. pascal void ScreenRes(short *scrnHRes,short *scrnVRes)
  105.     = {0x225F,0x32B8,0x0102,0x225F,0x32B8,0x0104}; 
  106. pascal void GetIndPattern(Pattern thePat,short patternListID,short index); 
  107. void setstring(StringHandle theString,char *strNew); 
  108. void shieldcursor(const Rect *shieldRect,Point *offsetPt); 
  109. long deltapoint(Point *ptA,Point *ptB); 
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114. #endif
  115.